Adder-subtracter



Aug. 13, 1963 w. J. GEsEK, JR

ADDER-SUBTRACTER Filed Aug. 22, 1960 "2 warmer/0H,

his )1 c-ofx- @544 im@ (imm I NV EN TOR. ZI//z//fmf 6515,47 Je BY www A Irfan/vif 3,1%,837 ADDER-SUBTRACTER William J. Gesch, Jr., Linden, N .J assigner to Radio Corporation lof America, a corporation oi Delaware Filed Aug. 22, 1966, Ser. No. 50,945 9 Claims. (Cl. 23S-475) The present invention relates to a binary addersubtracter.

A flexible logic network is la computer circuit which is capable of performing one of a number of logic functions. Tihe network may be made up of logic gates to each of which a control voltage and information signals are applied. A control voltage, when at one level, opens the gate to which it is applied and, when at another level, closes the gate. The number of functions the network can perform depends upon the number of variables (information signals) and the number of gates. As one example, if there are four gates, and each gate receives two different input variables, one X or X and the other Y or Y, where X and Y are information signals representing binary digits, then the network can perform the 16 possible logic functions for X, X, Y and Y. The control voltages applied to the gates determine the one of the logic functions selected. For example, if the gates are all and gates, and the control voltages are such that only the gate receiving X and Y is enabled, then the network performs the logical and function XY. If the gates receiving XY, XY, and XY are enabled, then the network performs the logical or function, and so on.

It has been found necessary in one practical computer employing a large number of flexible logic networks such as described above sometimes to add and sometimes to subtract the binary digits applied to the network. The straightforward way of accomplishing either of these arithmetic operations is to apply control voltages to the ilexible logic gates which inactivate the gates and to apply the binary digits directly to a binary adder or subtracter.

According to the present invention, use is made of the flexible logic networks to perform part of the addition or part of the subtraction so that the remainder of the addition or subtraction can be performed in much simpler circuits following the flexible logic networks. When operating the circuit of the invention as Ian adder, control voltages `are applied to the flexible logic network to produce an output X Y+T, and when operating the circuit of the invention 'as a subtracter, control voltages are applied to the ilexible logic network to produce an output XY-l-Y. The circuit following the flexible logic network derives from the quantity X Y-l-, and C, the carry input, the sum S and carry Co outputs:

S(sum) (TY-l-XY) C-l- (Y-{-X) and C(carry) (Y-l-XY) C-l-XY The same circuit derives from the quantity Y-{JIY and the borrow C input, the difference S and borrow Co outputs:

United States Patent 31,100,837 Patented Aug. 13, 1963 binary digit zero` For the sake of the discussion which follows, the convention is adopted that a high level signal represents the binary digit one yand the low level s1gnal ythe binary digit zerof This assumption holds both for inputs to and outputs from; the circuits. Also, to `simplify the discussion, rather than speaking of `an electrical signal being applied to or derived from a block or a logic network, it is hereafter stated that a one or a Zero is applied to or obtained from the block or network.

The figure includes logic circuits known as multiple input none gates. A none gate `produces a one output when all of the inputs to the gate are zero and a zero output when one or more of the inputs are one The gate may consist of an and gate with an' inverter in series with each input lead to the and gate. Alternatively, a none gate may consist of an or gate followed 4by an inverter. The Boolean equation for a none gate having A and B inputs and a C output is =C or m= and the truth table for the gate is:

A B C The circuit shown in FIGURE l consists of two stages of a parallel adder-subtracter, however, it is to be understood that the complete adder-subtracter may consist of many more stages. F or example, in a practical computer the adder may have 20 or more `stages. Alternate stages of the complete adder-subtracter are identical. Thus, the An+2 stage and AnJr stage, neither of which are shown, are identical to the An stage, and the A+3 stage and An+5 stage, neither of which lare shown, are identical with the An+1 stage. rlihe An stage may be the first stage, that is, the one corresponding to digits of the lowest or A0 order.

In the An and Antl stages shown in the drawing, the circuit elements are identical. Accordingly, those of the An+1 stage are legended with the same reference numerals :followed by a.

Each stage ofthe circuit includes two flip-flops 10` and 12. The two outputs of flip-nop 10` [are Xn and Xn and the two outputs of hip-flop 12 are Yn and Y. The

i inputs to the fiip-iiops are not shown but it is to be understood that they `are present. A set pulse, indicative of a binary digit to be added (or subtracted), applied to a flip-hop produces `a one output at the unbarred terminal and a reset pulse applied to the flip-flop produces a one output at the barred terminal.

The four outputs of the two Hip-flops serve as inputs to four none gates i4, 16, 18 Iand 20. Each none gate receives two different inputs, gate 14 receiving XY, gate 16 XY, gate ISXY, and gate 2li XY. These four none gates make up a flexible logic network. In other words, the output the network produces depends upon the control voltages K1-K4 applied to the gates. When a control voltage applied to a gate represents the binary digit one, the gate is inactivated and when it represents the binary digit zero, the gate is enabled. Since there are four gates and each is capable of assuming two different conditions, the maximum number of different outputs which are possible are 24 or 16. Two of these outputs are employed for the addition function and two 'are employed for the subtraction function, as is described more fully later.

The output leads from` the four gates are connected through a common lead 22 to an' inverter 24. Here and in other places in the circuit, a multiple connection to a-common point or lead performs the logical or function. The input to the inverter is some logical function Z, las is explained more fully below, and the output Lead 22 is also connected through lead 26 to none gates 28 and't andthe output lead 32 of the inverter is connectedto none gates 34 and 36. Y

Another input terminal to stage A is shown at 3S. The signal available at this terminal is i.applied via lead 40 to none 'gates 28 `and 36, and through ian* inverter 42 to none gate 36. The second input to none gate 34 is the output of dip-dop 10. None gates 30- and 36 are connected to a common output terminal 44 and none gates 28 and 34 are connected -to a common output terminal 46.

The operation of the circuit as `an adder or subtracter may be better understood by a consideration of the following truth table for binary addition and subtraction. For addition, X =addend, Y=augend, and Czcarry. For subtraction, X=minuend, Y=subtrahend, and C:

From the truth table above, the Boolean expression defining the sum is:

and the Boolean expressions deiinin-g the carry and its complement are:

In like manner, the Boolean equations defining the difference and borrow are:

Returning to the drawing, .to operate the circuit as an adder, the control voltages ICF-K4 are made to represent the ifollowing binary digits:

K2=1 K3=1 K4=0 'I'his means that fnone gates 16 and 18 are inactivated `and none gates 14 and 20 are enabled. The input to terminal 3S isv the carry from the previous stage, in the As is shown in the Z :X Y-l-T 12) Z is inverted by stage 24 to obtain Z=X+Y (13) '111e Sn (sum) output available at terminal 44 is Sn(sum) :Z-i- (14) Substituting Equations 12 and 13 into Equation 14 gives Sn(sum)=(XY-1Y)C+ (XY--YW (15) Equation =l5 is identical with Equation 2 proving that tue sum output fat terminal 44 is correct.

The Con(carry) output at terminal 46 is C0(carry) :XZ-i-'Z (16) Substituting Equations l2 and 13 into Equation 16 gives Equation 18 is identical to Equation 4 proving that the A stage properly performs the carry function.

The A.n+1 stage is like the A stage with the following exceptions: X rather than is `applied as one of the inputs to none gate 34a. The carry input from terminal 46 to inverter 42a is ya C rather than a The output of inverter 42a is applied to none gate 36a rather than none gate 3d. Finally, the output at terminal 46a is carry rather than carry.

The Z and quantities of the An+1 stage are identical with the same quantities of the An stage since the same control voltages are applied to the flexible logic gates in both stages. The sum output available at terminal 44 is Sn+1(sum)=Z Oi-ZC (19) This, of course, is identical with Equation 14 proving that the sum output ofthe An+1 Stage is correct. The output at terminal 46a is on+1 (carry) :ZF-l-Z (20) Substituting Equations 12 and 13 into 20 gives '('onflarry)=(XY+Y)+(XY+Y) (21) which can be reduced to Equation 22 is identical with Equation 6 proving that the output at terminal 46a is carry.

As mentioned in the introductory portion of the specication, the exible logic networks in the An and An+1 stages can be used for performing -any one of 16 ditferent logic functions. `If it is idesired not to do arithmetic or subtraction lbut instead to have the ilexible logic networks perform other functions for the computer, 1:1 is applied to none gates 30, 36, 30a and 36a. This inactivates these gates. The flexible logic network output is then available at terminals 43 and 48a.

An important feature of the adder described above is that the carry propagation time is kept at a small value. In each case, the output is made to be such that the inverter need not be placed in series with la line carrying a carry from one carry output terminal to a none gate leading to the next carry output terminal. For example,

it may be noted lthat the carry goes directly from terminal j If, however, the A than C( carry) were available at terminal 46 or C(carry) rather than (carry) were available at terminal 38, the inverters would have to be placed in series with the lines extending from carry terminal to carry .terminal and .the delay in obtaining the last carry would then include the sum `of the ydelays introduced by the inverters. The advantage of minimum C(borrow) propagation time is also present when using the circuit for subtraction.

The circuit of the invention performs subtraction when the following control binary digits are applied to the ilexible logic networks:

These inputs inactivate none gates 14 and 20 and enable none gates 16 and 18. Also, .the input applied to terminal 38 is C rather than `It is to be understood that when the circuit is employed as a subtracter, C rep resents borrow rather than carry and S represents difference rather than sum.

In Boolean terms, the output Zd of the flexible logic network available at lead 22 and the inverted output available at lead 32 are:

zd=XY+XY (23) 'Z-FXYJFX-r (24) The Sn(ldiiference) available at lead 44 is Sn(idiiference) :Zd-l-ZdC (25) Note, in this connection, that when operating as a subtracter, the input from terminal 38 to none gates 28 and 38 is C(borrow) and the input to none gate 30 is (borrow). In other words, the C inputs to the none gates 28, 36 `and 30, when the circuit is operating as a subtracter, :are the complements of the C inputs to the none gates when the circuit is acting as an adder. Substituting Equations 23 and 24 into 25 gives available at terminals 44a and 46a of the An+1 stage are, `by inspection,

Equation 30 is identical to Equation 25 proving that the An+1 stage properly performs the difference function. Equation 32 is identical with Equation 9 proving that the An+1 stage properly performs the borrow function.

What is claimed is:

1. A binary adder-subtracter comprising, `a flexible logic network made up of four logic gates for deriving from the respective input signals indicative of binary digits XY, X, XY and 'X-Y, a signal indicative of the binary digit Z in response to certain control voltages applied to said network and a signal indicative of the binary digit Z in response to other control voltages applied to the network, where Z is defined by the Boolean equation Z=XY+X7g and a network receptive of the Z signal `and a carry signal for deriving therefrom sum S and carry Co output signals defined by the Boolean equations S=ZC+Z and CO=XZ+CZ and receptive of the Z signal and laV borrow signal C for deriving therefrom difference S and Aborrow output signals .defined by the Boolean equations S=W|ZC and 0=ZU+X`Z Y 2. A binary adder-subtracter comprising, a flexible logic network made up of four none gates for deriving from input signals indicative of binary digits X, X, Y and Y a signal indicative of the binary digit Z in response to certain control voltages applied to said network and a signal indicative of the binary digiti in response to other control voltages applied to the network, where Z is defined by the Boolean equation Z=XY|X Y; and a network receptive of the Z signal and a carry signal for deriving therefrom sum S `and carry Co output signals defined by ythe Boolean equations and receptive of the Z signal Iand a borrow signal C for deriving therefrom difference S and borrow 'o output signals defined by the Boolean equations S=Z+ZC and D--Z-l-.

3. In a binary arithmetic circuit, four none gates; means for `applying to the rst none gate signals indicative of the quantities and means for applying to the second none gate signals indicative of the quantities Z and means for applying to the third none .gate signals indicative of the quantities Z and means for applying to the fourth none gate signals indicative of the quantities Z and C, where Z=XY`X'Y, X is an addend binary digit, -Y is an augend binary digit, and C is a carry binary digit; an or circuit connected to receive the outputs of the first and second gates; and an or circuit connected to receive the outputs of the third and fourth gates.

4. In a binary arithmetic circuit as set forth in claim 3, said means for applying signals to the first, second, third, and fourth none gates each including a exible logic network.

5. In :a binary arithmetic circuit, four none gates; means for applying to the first none gate signals indicative of the quantities X and means for 'applying to the second none gate signals indicative of the quantities Z and C; means for applying to the third none gate signals indicative of the quantities Z and IC; means for applying to the fourth none gate signals indicative of the quantities Z and where Z=XYIY, X is a minuend binary digit, Y is a subtrahend binary digit, and C is a borrow binary digit; an or circuit connected to receive the outputs of the rst two gates; and an or circuit connected to receive the outputs of the second two gates.

6. Ina binary `arithmetic circuit as set forth in claim 5, each means for applying signals to a none gate including a flexible logic network.

7. In a parallel binary adder-subtracter circuit, a plurality of stages, each for adding or subtracting digits of different rank; and means for applying via one signal lead carry signals from odd to even ones of said stages and via one signal lead c a signals from even to odd ones of said stages when the circuit is adding and via the same lead as used for the carry signals m signais from odd to even ones of said stages Iand via the same lead as used for the cy" signals borrow signals from even to odd ones of said stages when the circuit is subtracting.

8. In a parallel binary adder-subtracter, a plurality of stages, each for operating on a binary bit of different rank, each stage comprising 'a flexible logic network for deriving from input sign-als indicative of the binary digits Y X, Y and `a signal indicative of thelbin'ary digit Z in response to certain control voltages applied to said network `and a signal indicative of the binary digit Z in4 response to other control voltages applied to the network, where Z is defined by the Boolean equation Z=XY+W; a plurality of networks, `one in each` alternate stage, each network receptive of the Z signal, a carry signal and one of said input signals for deriving therefrom sum S and carry C0 output signals defined by the Boolean equations S=ZC|Z and C0=ZC|CZ, and receptive of the Z signal, a borro-w signal C, and one of said input signals for deriving therefrom difference S and borrow o output signals defined by the Boolean equations S=Z+ZC and '=Zl-XZ; and a plurality of networks, one in each remaining stage, each said network receptive of the Z signal, a carry signal C, and one of said input signals for deriving therefrom the surn S and carry o output signals defined by the Boolean equations S=Z+ZC and 'N-' Z-l-Z, `and receptive of the signal, borrow signal O and one of said input signals for deriving therefrom the difference S and borrow Co output signals defined by the Boolean equations S=CZ+U and C0=CZ+Z 9. In a parallel binary adder-subtracter, a plurality of stages, each for operating on a binary bit of different rank, each stage comprising Ia iiexible ylogic network for deriving from input signals indicative of binary digits X, Y and Y, a signal indicative ofthebinary digit Z in response to certain control voltages applied to said net- Work and a signal indicative of the binary digit 'Z- in response to other control voltages applied to the network, where Z is defined by the Boolean equation ZzXY-l-;

a network in each odd stage receptive of the Z signal, a carry signa-l and one 'of said input signals for deriving therefrom surn S and carry Co output signals defined by the Boolean equations S=ZC+Z and C0,=XZ|CZ, and receptive of the signal, a yborrow signal C, and

one of said input signals for deriving therefrom difier- Y ence S `and borrow (o output signals defined' by the Boolean equations S=7Z+ZC and ozZ-l-XZ; ya network in each even stage receptive of the Z signal, a carry signal C, and one of said input signals for deriving therefrom sum S and carry o output signals dened by the Boolean equations S=ZCi-Z and 'O=+Z, and receptive of the Z signal, `a borrow signal and one of said input signals for deriving therefrom dilerence S and borrow Co output signals defined by the Boolean equations S=ZU+ZC and C0 and CO=CZ+'-Z; and means for applying the ycarry output signal Co from even to odd stages and from odd to even stages when the circuit is ladding and the borrow outpfu-t signal Co from odd to even stages and b@ from even to odd stages when the circuit is subtracting.

References Cited in the tile of this patent UNITED STATES PATENTS 2,803,401 Nelson Aug. 20, 1957 2,872,111 Hecht Feb. 3, 1959 2,952,407 Weiss et al. Sept. 13, 1960 3,001,711 Frohrnan Sept. 26, 1961 OTHER REFERENCES De Sautels: The Versatile Transistor NORv Circuit,

' Control Engineering, May 1960, pp. 101404.

UNITED STATES PATENT OFFICE CERTIFICATE OF CORRECTION Patent No. 3,100,837 August 13, 1963 william J. Gesk, Jr.

It is hereby certified that error appears in the above numbered patent requiring correction and that the said Letters Patent should read as corrected below.

Column l, lines 47 and 5l, for "XYJf-", each occurrence,

read XYJf-O line 54, for "()'-PXYV' read (YXY) same column l, line 6l, for "(XYHY-Y" read (XYH-(Y) column 2, line 20, for "-R" read R line 57, for "il-f" read column 3, equations (l) (2) (5) (6) (8) (9) (lO) and (ll) should appear as shown below instead of as in the patent:

column 4, equations (l2) (l4) (l5) (l) (I7) (19) (20) (2l) and (22) should appear as shown below instead of as in the patent:

column 5, equations (24) (26) (28) (29) and (32) should appear' as shown below instead of as in the patent:

C0=oz+ 2 Signed and sealed this 12th day of May 1964.

(SEAL) Attest:

ERNEST W. SWIDER EDWARD J. BRENNER Atte-sting Officer Commissioner of Patents 

2. A BINARY ADDER-SUBTRACTER COMPRISING, A FLEXIBLE LOGIC NETWORK MADE UP OF FOUR "NONE" GATES FOR DERIVING FROM INPUT SIGNALS INDICATIVE OF BINARY DIGITS X, $, Y AND $ A SIGNAL INDICATIVE OF THE BINARY DIGIT Z IN RESPONSE TO CERTAIN CONTROL VOLTAGES APPLIED TO SAID NETWORK AND A SIGNAL INDICATIVE OF THE BINARY DIGIT $ IN RESPONSE TO OTHER CONTROL VOLTAGES APPLIED TO THE NETWORK, WHERE Z IS DEFINED BY THE BOOLEAN EQUATION Z=XY+$$; AND A NETWORK RECEPTIVE OF THE Z SIGNAL AND A CARRY SIGNAL $ FOR DERIVING THEREFROM SUM S AND CARRY CO OUTPUT SIGNALS DEFINED BY THE BOOLEAN EQUATIONS 